<?php
/**
 * Menu is a widget displaying menu items.
 *
 */
class PaperMenu extends CWidget
{
	/**
	* Items.
	* 
	* 	array('label', 'url', additional options..)
	* 
	* Additional Options:
	* - visible
	* - pattern
	* 		pattern used to check if this item matches current page.  Otherwise the url 
	* 		option is used
	* - htmlOptions
	*/
	public $items=array();

	/**
	* Whether to hide any active/open menu items
	*/
	public $hideActive=false;

	/**
	* The view to use
	*/
	public $view='mainMenu';
	
	public function run()
	{
		$items = $Categories = Category::model()->findAll('parent = 0');
		$this->render($this->view,compact('items'));
	}
}
